<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Image</title>
<style type="text/css">
	@IMPORT url("css/common.css");
</style>
<style type="text/css">
    @import "http://o.aolcdn.com/dojo/0.9.0/dijit/themes/tundra/tundra.css";
    @import "http://o.aolcdn.com/dojo/0.9.0/dojo/dojo.css"
</style>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/0.9.0/dojo/dojo.xd.js"
            djConfig="parseOnLoad: true"></script>
<script type="text/javascript">
   dojo.require("dojo.parser");
   dojo.require("dijit.form.DateTextBox");
   dojo.require("dijit.form.NumberTextBox");
   dojo.require("dijit.form.Button");
</script>

<script type="text/javascript">
	function deleteImage(id){
		if(confirm('Delete this record?')){
			document.location = '<s:url value="/manage/imageDelete.do" includeParams="none"/>' + '?id=' + id;
		}
	}
</script>
</head>
<body class="tundra" style="font-size: 13px;">
	<div class="bodywrap">
		<div style="line-height: 40px; text-align: left; background-color: #CCCCCC;">
			<a href="<s:url value="/manage/imageEdit.do"/>">Add</a>
			<a href="<s:url value="/process/viewMap.do"/>">Map</a>
		</div>
		<table style="width: 100%; border: 1px solid #EEEEEE;" cellpadding="0" cellspacing="0">
			<tr>
				<td class="cellTitle">Path</td>
				<td class="cellTitle">Row</td>
				<td class="cellTitle">Date</td>
				<td class="cellTitle">File</td>
				<td class="cellTitle">Edit</td>
				<td class="cellTitle">Delete</td>
			</tr>				
			<s:iterator value="fires">
				<tr>
					<td class="cellBody"><s:property value="path" /></td>
					<td class="cellBody"><s:property value="row" /></td>
					<td class="cellBody"><s:property value="date" /></td>
					<td class="cellBody"><s:property value="dir" /></td>
					<td class="cellBody"><a href="<s:url value="/manage/imageEdit.do" includeParams="none"/>?id=<s:property value="id"/>">Edit</a></td>
					<td class="cellBody"><a href="#" onclick="deleteImage('<s:property value="id"/>');">Delete</a></td>
				</tr>				
			</s:iterator>
		</table>
	</div>
</body>
</html>